-
Notifications
You must be signed in to change notification settings - Fork 3k
[Monitor Ingestion] Add typespec generation files #41923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
7fd96fe
to
12441c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR regenerates the Azure Monitor Ingestion SDK using TypeSpec, updating both client implementation and tests to align with TypeSpec-generated patterns.
- Regenerated SDK core files: renamed generator comments, adjusted imports, updated
_upload
method signatures to usestream_name
and JSON encoding viaSdkJSONEncoder
. - Updated tests to open log files in binary mode (
"rb"
) for uploads. - Added and reordered package metadata (
tsp-location.yaml
,MANIFEST.in
,apiview-properties.json
, and_metadata.json
) and sample pylint directives.
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tsp-location.yaml | New TypeSpec location and commit information for SDK generation |
tests/test_logs_ingestion_async.py | Switched file open mode to binary for async tests |
tests/test_logs_ingestion.py | Switched file open mode to binary for sync tests |
tests/conftest.py | Updated sanitizer regex and placeholder value arguments |
samples/async_samples/*.py | Added pylint disable directives for line length |
aio/_operations/_patch.py | Reformatted calls to super()._upload for readability |
aio/_operations/_operations.py | Adjusted imports and replaced JSON handling with SdkJSONEncoder |
aio/_operations/init.py | Updated generator comment |
aio/_configuration.py | Updated generator comment |
aio/_client.py | Updated generator comment, refactored serializer imports, and left unused _endpoint |
aio/init.py | Updated generator comment |
_utils/utils.py | Updated generator comment and refactored mixin base class |
_utils/serialization.py | Condensed license header and updated generator comment |
_utils/model_base.py | New generated model base module |
_utils/init.py | Added generator comment |
_operations/_patch.py | Reformatted calls to super()._upload for readability |
_operations/_operations.py | Adjusted imports, renamed parameters, and JSON encoding changes |
_operations/init.py | Updated generator comment |
_configuration.py | Updated generator comment and fixed credential scope URL |
_client.py | Updated generator comment, refactored serializer imports, and left unused _endpoint |
init.py | Updated generator comment and set __version__ |
assets.json | Updated tag to match latest package version |
apiview-properties.json | Added cross-language package definitions |
_metadata.json | Added API version metadata |
MANIFEST.in | Included py.typed marker and reordered include patterns |
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this | ||
default value may result in unsupported behavior. | ||
:keyword api_version: The API version to use for this operation. Default value is "2023-01-01". | ||
Note that overriding this default value may result in unsupported behavior. | ||
:paramtype api_version: str | ||
""" | ||
|
||
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None: | ||
_endpoint = "{endpoint}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local variable _endpoint
is assigned but never used. Consider removing it to clean up the initializer.
_endpoint = "{endpoint}" |
Copilot uses AI. Check for mistakes.
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this | ||
default value may result in unsupported behavior. | ||
:keyword api_version: The API version to use for this operation. Default value is "2023-01-01". | ||
Note that overriding this default value may result in unsupported behavior. | ||
:paramtype api_version: str | ||
""" | ||
|
||
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None: | ||
_endpoint = "{endpoint}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local variable _endpoint
is assigned but never used. It can be removed to simplify the constructor.
_endpoint = "{endpoint}" |
Copilot uses AI. Check for mistakes.
This regenerates the Ingestion SDK using TypeSpec and tsp-client.